function re_mathat = matHat(arr)

syms x y z
x = arr(1,1);
y = arr(2,1);
z = arr(3,1);

arr1 = zeros(3,3);

arr1(1,1) = 0;
arr1(1,2) = -z;
arr1(1,3) = y;

arr1(2,1) = z;
arr1(2,2) = 0;
arr1(2,3) = -x;

arr1(3,1) = -y;
arr1(3,2) = x;
arr1(3,3) = 0;

re_mathat = arr1;

end